<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Extends Option 扩展选项</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Extends Option 扩展选项</h1>
    <hr>
    <div id="app">
            {{message}}
       <p><button @click="add">增加</button></p>
    </div>
</body>
<script>
     var bbb={
        created:function(){
            console.log("我是被扩展出来的");
        },
        methods:{
            add:function(){
                console.log('我是被扩展出来的方法！');
            }
        }
    };
    var app = new Vue({
        el:"#app",
        data:{ 
            message:"大家好"
        },
        methods: {
            add:function(){
                console.log('我是原生方法');
            }
        },
        extends:bbb
        
    })
</script>
</html>